# 基于numpy
import pandas as pd

data = {
  'name': ['Tom', 'Jerry', 'Spike', None],
  'age': [18, 23, None, 22],
  'city': ['new york', None, 'Chicago', "Boston"]
}


# df = pd.read_excel('./data.xls')
df = pd.DataFrame(data)
print(df)

# 清洗空值
df_cleaned = df.dropna()
print(df_cleaned)

# 填充缺失值
df_filled = df.fillna(0)
print(df_filled)

# 记录是否有重复
print(df.duplicated())